package com.atguigu.chapter05

object TestFunction {

  def main(): Unit = {
  }

  def main(args: Array[String]): Unit = {
    /*import java.util.Date
    new Date()

    def test(): Unit = {
      println("no args no return")
    }

    test()

    /*def test(name:String):Unit={

    }*/

    def test3():Unit = {
      def test3(name:String):Unit={

      }
    }

    def test5(name:String,age:Int):Unit = {
      println(s"$name,$age")

    }
    test5("dalong",50)*/

    def test(s : String*):Unit={
      println(s)
    }

    test("Hello","Scala")

    test()

    def test3(name:String,age:Int=30):Unit={
      println(s"$name,$age")

    }

    test3("jinlian", 20)

    test3("dalang")

    test3(age = 20,name = "www")

  }

}
